#!/bin/sh
#
# Startup script for bip as standalone server
#

# Source defaults file; edit that file to configure this script.
ENABLED=1
PARAMS=""
if [ -e %OPTWARE_TARGET_PREFIX%/etc/default/bip ]; then
  . %OPTWARE_TARGET_PREFIX%/etc/default/bip
fi

test "$ENABLED" != "0" || exit 0

if [ -n "`%OPTWARE_TARGET_PREFIX%/bin/pidof bip`" ]; then
    %OPTWARE_TARGET_PREFIX%/bin/killall bip 2>/dev/null
fi

%OPTWARE_TARGET_PREFIX%/bin/bip -f %OPTWARE_TARGET_PREFIX%/etc/bip.conf $PARAMS
